﻿<%@ WebHandler Language=C# Class=category %>
using Models;
using System;
using System.Web;
using Newtonsoft.Json;
using System.Linq;

public class category : IHttpHandler {

    public void ProcessRequest(HttpContext context) {
        context.Response.ContentType = "text/plain";

       // string query = HttpContext.Current.Request.Params[id];
        //if (string.IsNullOrEmpty(query))
        //{
          //  HttpContext.Current.Response.Write(parameter error);
        //    return;
        //}
        var code = 1;
        var msg = "订单数量";
        var time = DateTime.Now;
        using (Entities bll = new Entities())
        {
           
            var data = new { nopay=0,nosend=0,noget=0,nocomment=0,aftersale=0 };
            context.Response.Write(JsonConvert.SerializeObject(new { code,msg,time,data}));
        }

        HttpContext.Current.Response.End();
        //context.Response.Write(Hello World);


    }


    public bool IsReusable {
        get {
            return false;
        }
    }

}